package ThreadTest;

/**
 * @author 刘全
 * @date 2021/8/7
 */
public class GetThreadName {
    public static void main(String[] args) {
        String name = Thread.currentThread().getName();
        System.out.println(name);
        MyThread mt = new MyThread("子线程");
        //1.MyThread mt = new MyThread("子线程");
        //2.mt.setName("子线程");
        mt.start();
    }
}
